package battleModel;

import java.awt.Image;
import java.awt.Point;
import java.awt.Shape;

public abstract class Obstacle {
	private int health;
	private boolean damageable;
	private Point location;
	private Image img;
	
	public Obstacle(int h, boolean d, Point l, Image i){
		health=h;
		damageable=d; 
		location=l;
		img=i;
	}
	public abstract Shape getCollisionShape();
	
	public int getHealth(){
		return health;
	}
	
	public Point getLocation(){
		return location;
	}
	
	public boolean isDamageable(){
		return damageable;
	}
	
	public Image getImage(){
		return img;
	}
	
	public void setImage(Image img){
		this.img=img;
	}
	
	public void setLocation(Point p){
		location=p;
	}
	
	public void receiveDamage(int dmg){
		if(damageable){
			health-=dmg;
		}
	}
	
	public boolean isDead(){
		return health<=0;
	}
}
